package com.ws.q1.service.lmpl;

import com.ws.q1.bean.GongYingShang;
import com.ws.q1.bean.YouQingLianJie;
import com.ws.q1.mapper.YouQingLianJieMapper;
import com.ws.q1.service.YouQingLianJieService;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class YouQingLianJielmpl implements YouQingLianJieService {
    @Autowired
    YouQingLianJieMapper youQingLianJieMapper;


    @Override
    public int add(YouQingLianJie youQingLianJie) {
        return youQingLianJieMapper.add(youQingLianJie.getName(), youQingLianJie.getUrl());
    }

    @Override
    public List<YouQingLianJie> list() {
        return youQingLianJieMapper.list();
    }

    @Override
    public void deleteById(Integer id) {
        youQingLianJieMapper.deleteById(id);
    }



    @Override
    public YouQingLianJie huixian(Integer id) {
        return youQingLianJieMapper.huixian(id);
    }

    @Override
    public void update(Integer id, YouQingLianJie youQingLianJie) {
        youQingLianJieMapper.update(id,youQingLianJie);

    }


}
